/**
 * 
 */

function writeAppName() {
  let name = appInfo.name || '';
  writeOfId('app_title', name);
}

function writeAppInfo() {
  let name = appInfo.name || '';
  let version = appInfo.version || '';
  let build = appInfo.build || '';
  let updateTime = appInfo.updateTime || '';
  let size = appInfo.size || '';
  let descArray = appInfo.desc || [];

  writeOfId('app_title', name);
  writeOfId('app_version', '版本：'+version);
  writeOfId('app_build', 'build：'+build);
  writeOfId('app_update_time', '更新日期：'+updateTime);
  writeOfId('app_size', '大小：'+size);

  let length = descArray.length;
  for(let i=0; i<length; i++) {
    let text = descArray[i] || '';
    createDivText(text);
  }
}

function writeOfId(_id='', text='') {
  document.getElementById(_id).innerText=text;
}

function createDivText(text='') {
  let div = document.getElementById('app_desc');
  let odiv=document.createElement('div');
  odiv.innerHTML = text;
  odiv.className = 'desc_text';
  div.appendChild(odiv);
}